Tempo
- By Canonical Observability
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/stable | 51 | 01 Aug 2024 | |
latest/stable | 9 | 16 Feb 2024 | |
latest/candidate | 71 | 01 Aug 2024 | |
latest/candidate | 9 | 12 Dec 2023 | |
latest/beta | 75 | 01 Aug 2024 | |
latest/beta | 9 | 12 Dec 2023 | |
latest/edge | 80 | 02 Sep 2024 | |
latest/edge | 9 | 31 Jul 2023 |
juju deploy tempo-k8s --channel edge
Deploy Kubernetes operators easily with Juju, the Universal Operator Lifecycle Manager. Need a Kubernetes cluster? Install MicroK8s to create a full CNCF-certified Kubernetes system in under 60 seconds.
Platform:
Setting up tracing integration
if you are charming an application that is already instrumented for tracing or you plan to configure the workload or the charm itself to push traces, you can integrate with tempo-k8s
to send traces to a Tempo endpoint.
Instrumenting your workload
is not covered under tempo-k8s
. Some workloads, like Grafana
are already instrumented for tracing by design. Otherwise, you can use auto-instrumentation libraries to instrument your workload and integrate with tempo-k8s
as a tracing backend.
For an example of charms that already integrate with tempo-k8s
to collect traces, see loki
and prometheus
.
Add an integration endpoint to charmcraft.yaml
host and injesters data is communicated over relation data, where the charmed application is the requirer and Tempo charm is the provider.
For consistency across the ecosystem, it is encouraged to name the relation tracing
.
Edit your charm’s charmcraft.yaml
to add, under requires
, the following:
requires:
# any other requirers your charm supports
tracing:
interface: tracing
limit: 1
Fetch the tracing charm library
charmcraft fetch-lib charms.tempo_k8s.v2.tracing
The TracingEndpointRequirer
object enables your charm to easily access Tempo endpoint information exchanged over a tracing
relation interface.
Use TracingEndpointRequirer
If you are intending to send traces with otlp_http
and otlp_grpc
tracing protocols:
from charms.tempo_k8s.v2.tracing import TracingEndpointRequirer
class FooCharm:
def __init__(self, *args):
super().__init__(*args, **kwargs)
...
self.tracing = TracingEndpointRequirer(self, protocols=["otlp_http", "otlp_grpc"])
...
This will ensure that each unit of Foo
will have access to a Tempo endpoint to push charm traces to once a
relation is established.
For the list of supported protocols
, see Tracing Protocols.
Access Tempo endpoints
After instantiating TracingEndpointRequirer
with a list of protocols, tempo-k8s
charm will provide, as part of its databag, a set of Tempo endpoints for the requested protocols that your workload
& charm
can use to push traces to.
from charms.tempo_k8s.v2.tracing import TracingEndpointRequirer
class FooCharm:
def __init__(self, *args):
super().__init__(*args, **kwargs)
...
self.tracing = TracingEndpointRequirer(self, protocols=["otlp_http", "otlp_grpc"])
...
# get tempo endpoints
if self.tracing.is_ready():
grpc_endpoint = self.tracing.get_endpoint("otlp_grpc")
http_endpoint = self.tracing.get_endpoint("otlp_http")